package com.tmeone.erpone.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.tmeone.erpone.entity.Customer;
import com.tmeone.erpone.mapper.CustomerMapper;
import com.tmeone.erpone.service.ICustomerService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.tmeone.erpone.entity.Customer;
import com.tmeone.erpone.mapper.CustomerMapper;
import com.tmeone.erpone.service.ICustomerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author tmeone
 * @since 2021-04-19
 */
@Service
public class CustomerServiceImpl extends ServiceImpl<CustomerMapper, Customer> implements ICustomerService {

    @Autowired
    CustomerMapper customerMapper;

    @Override
    public IPage<Customer> getPageCustomer(Page<Customer> page) {
        return customerMapper.selectCustomerPage(page);
    }

    @Override
    public List<Customer> findCustomerByKey(String key) {
        return customerMapper.findCustomerByKey(key);
    }
}
